import {AfterViewChecked, NgModule, OnDestroy} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {HomeComponent} from './components/component-service/home/home.component';
import {BindComponent} from './components/bind/bind.component';
import {ResponseComponent} from './components/response/response.component';
import {OrderComponent} from './components/component-communication/order/order.component';
import {LifeComponent} from './components/life-cycle/life/life.component';
import {ParentComponent} from './components/life-cycle/parent/parent.component';
import {ViewComponent} from './components/life-cycle/view/view.component';
import {ContentComponent} from './components/life-cycle/content/content.component';
import {FormComponent} from './components/form/form/form.component';
import {ReactiveFormComponent} from './components/form/reactive-form/reactive-form.component';
import {ReactiveRegistComponent} from './components/form/reactive-regist/reactive-regist.component';
import {ComponentComponent} from './components/http/component/component.component';
import {HomesComponent} from './components/homes/homes.component';

const routes: Routes = [
   {path: '', redirectTo: 'homes', pathMatch: 'full'},
  {path: 'homes', component: HomesComponent},
  {path: 'home', component: HomeComponent},
  {path: 'bind', component: BindComponent},
  {path: 'response', component: ResponseComponent},
  {path: 'order', component: OrderComponent},
  {path: 'life', component: LifeComponent},
  {path: 'parent', component: ParentComponent},
  {path: 'view', component: ViewComponent},
  {path: 'content', component: ContentComponent},
  {path: 'form', component: FormComponent},
  {path: 'reactive', component: ReactiveFormComponent},
  {path: 'reactiveForm', component: ReactiveRegistComponent},
  {path: 'http', component: ComponentComponent},
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule],
  declarations: []
})
export class AppRoutingModule {

}
